#ifndef QDESIGNER_H
#define QDESIGNER_H

#include "mainwindow.h"

#include <QtCore/QPointer>
#include <QtGui/QApplication>

QT_BEGIN_NAMESPACE

#define qDesigner \
    (static_cast<QDesigner*>(QCoreApplication::instance()))

class QDesignerWorkbench;

class QDesigner : public QApplication
{
    Q_OBJECT
public:
    QDesigner(int &argc, char **argv);
    virtual ~QDesigner();

    MainWindowBase *mainWindow() const {return m_mainWindow;}
    void setMainWindow(MainWindowBase *tw) {m_mainWindow = tw;}

signals:
    void initialized();

public slots:

private slots:
    void initialize();

private:   
    QDesignerWorkbench *m_workbench;
    QPointer<MainWindowBase> m_mainWindow;
};

#endif // QDESIGNER_H
